﻿using System;
using System.Collections;
using System.Linq.Expressions;
using System.Collections.Generic;

namespace NMA.Domain.Shared.Repository
{
    using NMA.Domain.Shared.Paging;

    public interface IRepository<TEntity> where TEntity : IEntity<TEntity>
    {
        IEnumerable<TEntity> All();

        Guid Add(TEntity entity);

        void Remove(TEntity entity);

        void Update(TEntity entity);

        IEnumerable<TEntity> GetBy(Expression<Func<TEntity, bool>> condition);

        IPagedList<TEntity> All(int pageIndex, int pageSize);
    }
}
